package com.example.demo.service;

import com.example.demo.entity.DTO.GoodsOrderSelectDTO;
import com.example.demo.entity.GoodsOrders;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Mr.Yang
 * @since 2024-05-31
 */
public interface IGoodsOrdersService extends IService<GoodsOrders> {

    //查询自己所有的订单内容
    List<GoodsOrderSelectDTO> selectOrderByUserId(Integer userId);

    /**
     * 更改订单状态
     * @param goods
     * @return
     */
    Boolean updateOrderStatusById(GoodsOrders goods);

    /**
     * 根据id查询订单
     * @param id
     * @return
     */
    GoodsOrders findById(Integer id);

    /**
     * 根据id删除订单
     * @param id
     * @return
     */
    Boolean deleteByGorderId(Integer id);
    //查询所有订单内容
    List<GoodsOrders> selectAllOrder();
}
